package com.freewater.javabase.demo.designpattern.command2.withundo.command;

import com.freewater.javabase.demo.designpattern.command2.withundo.receiver.Stereo;

/**
 * Created by FreeWater on 2017/4/4.
 */
public class SteroOffCommand implements Command {

	private Stereo stereo;

	public SteroOffCommand(Stereo stereo){
		this.stereo = stereo;
	}

	@Override
	public void execute() {
		this.stereo.off();
	}

	@Override
	public void undo() {
		this.stereo.on();
	}
}
